package org.lifxue.jqda.lucene.index.impl;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.UnsupportedEncodingException;

import org.apache.lucene.document.Document;

/**
 * 
 * @Description:
 * @Author: zhangzuoqiang
 * @Date: Sep 26, 2011
 */
public class FileDocument {

	public static Document Document(File file, String ext)
			throws FileNotFoundException, UnsupportedEncodingException,
			IOException {
		if (ext.toLowerCase().equals("txt")) {// 判断文件是否文本文件
			return FileDocumentTXT.Document(file);
		} else if (ext.toLowerCase().equals("pdf")) {

		} else if (ext.toLowerCase().equals("doc")) {

		} else if (ext.toLowerCase().equals("xls")) {

		}

		return new Document();
	}
}
